<template>
<!-- 封装的 -->
  <div class="articleItem
" >
<!-- 文章列表项 -->
<van-cell :to="'/detail/' + row.art_id" :title="row.title">

  <!-- <van-cell title="单元格" value="内容" label="描述信息" /> -->

  <template #label>
    <div class="image-box" v-if="row.cover.type===3">
    <van-image
      width="100"
      height="100"
      v-for="(item,index) in row.cover.images"
      :key="index"
      :src="item"
    />

  </div>
  <!-- <template #label> -->
    <span>{{row.aut_name}}</span>
    <span class="comment-num">{{row.comm_count}}</span>
    <span>{{row.pubdate | relativeTime}}</span>
  <!-- </template> -->
   </template>

     <!-- 自定义右侧图片内容 -->
  <template>
  <van-image class="right-image"

    v-if="row.cover.type===1"
    :src="row.cover.images[0]"

  />
  </template>
</van-cell>
  </div>
</template>

<script>
// import { getArticleList } from '@/api/article'
export default {
  name: 'Articleitem',
  props: {
    row: {
      type: Object,
      required: true
    }
  },
  data () {
    return {

    }
  },

  created () {

  },
  components: {
    // Articleitem

  },
  methods: {

  }
}
</script>

<style scoped lang='less'>
.articleItem{
  box-sizing: border-box;
  .comment-num{
  margin: 0 15PX;
  }
.image-box{
display: flex;
justify-content: space-between;
}
.right-image{
width: 232px;
height: 146px;
}
}

</style>
